package com.unnamed.b.atv.holder;

import com.unnamed.b.atv.model.TreeNode;
import ohos.agp.components.Component;
import ohos.agp.components.Text;
import ohos.app.Context;

/**
 * Created by Bogdan Melnychuk on 2/11/15.
 */
public class SimpleViewHolder extends TreeNode.BaseNodeViewHolder<Object> {
    public SimpleViewHolder(Context context) {
        super(context);
    }

    @Override
    public Component createNodeView(TreeNode node, Object value) {
        final Text tv = new Text(context);
        tv.setText(String.valueOf(value));
        return tv;
    }

    @Override
    public void toggle(boolean active) { }
}
